<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
            <input type="text" @keydown="fun2('good',$event)">
    </div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {
            message: "itcast",
            message1: "heima"
        },
        methods: {
            fun2 : function (abc, event) {
                //alert(abc); //强烈建议不要试用alert去调试信息
                console.log(event.keyCode);

                // 组织事件的默认行为
                if(event.keyCode == 65){
                    event.preventDefault();
                }
            },
            func1(){

            }
        }
    });
</script>
</html>